Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 25, 2025

This PR fixes code fence issues in the .NET metrics and tracing documentation where type names and other technical terms were being over-localized in non-English versions of the documentation.

Problem

As reported in #43876, technical terms like string, int, Boolean, and instrument type names were being translated/localized when the documentation was viewed in other languages, leading to confusing and incorrect translations. For example:

  • In Czech: Boolean was over-localized
  • In German: string was over-localized
  • In Russian: multiple technical terms were incorrectly translated

Solution

Added code fences (backticks) around all type names in the "Type" column of attribute tables across the metrics documentation files. This prevents these technical terms from being localized while still allowing the descriptive text to be properly translated.

Files Changed

  • built-in-metrics-system-net.md - Fixed all type names in attribute tables (string → string, int → int)
  • built-in-metrics-runtime.md - Fixed all type names in attribute tables
  • built-in-metrics-diagnostics.md - Fixed all type names in attribute tables
  • distributed-tracing-builtin-activities.md - Already properly formatted from previous PR

Example Change

Before:

| `dns.question.name` | string | The name being queried. | `www.example.com` | Always |

After:

| `dns.question.name` | `string` | The name being queried. | `www.example.com` | Always |

This ensures that string won't be translated to local language equivalents while still allowing the description "The name being queried" to be properly localized.

Fixes #43876.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/core/diagnostics/built-in-metrics-diagnostics.md .NET extensions metrics
docs/core/diagnostics/built-in-metrics-runtime.md .NET runtime metrics
docs/core/diagnostics/built-in-metrics-system-net.md System.Net metrics
docs/core/diagnostics/metrics-collection.md docs/core/diagnostics/metrics-collection

@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Jul 25, 2025
@Copilot Copilot AI changed the title [WIP] Code fence attribute and instrument type names in Metrics and Tracing docs Fix code fence issues in metrics and tracing documentation to prevent over-localization Jul 25, 2025
@Copilot Copilot AI requested a review from gewarren July 25, 2025 22:50
Copilot finished work on behalf of gewarren July 25, 2025 22:51
@gewarren
Copy link
Contributor

@copilot Are there any instrument names that should be surrounded with backticks?

@gewarren gewarren marked this pull request as ready for review August 4, 2025 22:51
@gewarren gewarren requested review from tommcdon and a team as code owners August 4, 2025 22:51
Copy link
Member

@IEvangelist IEvangelist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference @copilot, if a .NET version is listed, do not change it, as that can alter the meaning. For example, you in some places you changed .NET 8.8.0. to .NET 8.` which is misleading.

@gewarren
Copy link
Contributor

For future reference @copilot, if a .NET version is listed, do not change it, as that can alter the meaning. For example, you in some places you changed .NET 8.8.0. to .NET 8.` which is misleading.

Actually I changed those, but the changes have been superseded by #47584.

Copy link
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@gewarren gewarren enabled auto-merge (squash) August 15, 2025 03:28
@gewarren gewarren merged commit 83702f4 into main Aug 15, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-43876 branch August 15, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-fundamentals/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code fence attribute and instrument type names in Metrics and Tracing docs
3 participants